import request from '@/utils/request'

// 查询线下活动详情列表
export function listCompassActInfo(query) {
    return request({
        url: '/system/CompassActInfo/list',
        method: 'get',
        params: query
    })
}

// 查询线下活动详情详细
export function getCompassActInfo(id) {
    return request({
        url: '/system/CompassActInfo/' + id,
        method: 'get'
    })
}

// 新增线下活动详情
export function addCompassActInfo(data) {
    return request({
        url: '/system/CompassActInfo',
        method: 'post',
        data: data
    })
}

// 修改线下活动详情
export function updateCompassActInfo(data) {
    return request({
        url: '/system/CompassActInfo',
        method: 'put',
        data: data
    })
}

// 删除线下活动详情
export function delCompassActInfo(id) {
    return request({
        url: '/system/CompassActInfo/' + id,
        method: 'delete'
    })
}

// 导出线下活动详情
export function exportCompassActInfo(query) {
    return request({
        url: '/system/CompassActInfo/export',
        method: 'get',
        params: query
    })
}

// 精选、取消精选
export function updateChosenFlag(data) {
  return request({
    url: `/system/CompassActInfo/updateChosenFlag/${data.id}/${data.flag}`,
    method: 'post',
    data: data
  })
}
